//#region app common
var schedule = require("node-schedule");
var rule = new schedule.RecurrenceRule();
var dbHelper = require("../app_modules/mongoHelper.js");
var logtool = require("../app_modules/logtool.js");
function myschedule(){}
myschedule.job1=function(){
    console.log("job1:"+process.pid);
    
    // var filter={};
    // var includeItem={_id:0,password:0};
    // var sort={"code":1};
    // var pageIndex=1;
    // var pageSize=2;       
    //  dbHelper.find("User",filter,includeItem,sort,pageIndex,pageSize,function(data){        
    //     //return callback(data); ;
    //     console.log(data);
    //  });
}
myschedule.runJobs=function(){    
        var times = [];  
        for (var i = 1; i < 60; i+=5) {
            times.push(i);
        }  
        rule.second = times;
        var j = schedule.scheduleJob(rule, function () {
            console.log(new Date());
            //logtool.log("hello worrld");
            myschedule.job1();
        });
  }
  module.exports=myschedule;
  //#endregion